<template>
  <div>
    <div v-html="message"></div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const message = ref('')
const url = new URL('../../../workers/demo.work.js', import.meta.url)
const params = { a: 1, b: 2 }
window.$utils.createWorker(url, params).then((res) => {
  message.value = res.result
})
</script>
